<template>
<div class="main-content" >
  <button type="button" v-on:click="back()" class="btn screen-submit" style="position: relative;right: 0;">返回</button>
<div class="information-form" :style="{'overflow-y': 'scroll','height': scrollHeight+'px'}">
	<h3>楼盘基本信息</h3>
	<ul class="housing-list">
  		<li>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">楼盘名称:</label>
      			<div class="control-details">
  					<p class="ellipsis">{{premises.name}}<Tag color="warning" v-if="premises.mainPush==2">主推楼盘</Tag></p>
      			</div>
    		</div>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">城区:</label>
      			<div class="control-details">
      				<p class="ellipsis">{{premises.fullAreaName}}</p>
      			</div>
    		</div>
  		</li>
  		<li>
            <div class="list-info-template col-md-6">
              	<label class="control-label" for="">物业类型:</label>
              	<div class="control-details">
          			<p class="ellipsis">{{premises.estateTypeCN}}</p>
              	</div>
            </div>
            <div class="list-info-template col-md-6">
              	<label class="control-label" for="">建筑类别:</label>
              	<div class="control-details">
              		<p class="ellipsis">{{premises.buildingTypeCN}}</p>
              	</div>
            </div>
  		</li>
  		<li>
        	<div class="list-info-template col-md-6">
          		<label class="control-label" for="">楼盘标签:</label>
          		<div class="control-details"><p class="ellipsis">{{premises.codeNameCN}}</p></div>
        	</div>
        	<div class="list-info-template col-md-6">
          		<label class="control-label" for="">装修状况:</label>
          		<div class="control-details"><p class="ellipsis">{{premises.decorationTypeName}}</p></div>
        	</div>
  		</li>

     	<li>
            <div class="list-info-template col-md-6">
              	<label class="control-label" for="">容积率:</label>
              	<div class="control-details"><p class="ellipsis">{{premises.plotRatio}}%</p></div>
            </div>
            <div class="list-info-template col-md-6">
              	<label class="control-label" for="">绿化率:</label>
              	<div class="control-details"><p class="ellipsis">{{premises.greeningRate}}%</p></div>
            </div>
      	</li>
  		<li>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">开盘日期:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.formatOpeningTime}}</p></div>
    		</div>
    		<div class="list-info-template col-md-6">
              	<label class="control-label" for="">入住日期:</label>
              	<div class="control-details"><p class="ellipsis">{{premises.formatCheckInTime}}</p></div>
    		</div>
  		</li>

  		<li>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">物业公司:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.propertyCompany}}</p></div>
    		</div>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">物业费:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.propertyCharges}} 元/㎡/月</p></div>
    		</div>
  		</li>
  		<li>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">开发商:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.buildingCompany}}</p></div>
			</div>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">产权年限:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.rightYears}}年</p></div>
    		</div>
		</li>
		<li>
			<div class="list-info-template col-md-6">
				<label class="control-label" >地上车位数:</label>
				<div class="control-details">
					<div class="control-details"><p class="ellipsis">{{premises.upCarPort}}</p></div>
				</div>
			</div>
			<div class="list-info-template col-md-6">
				<label class="control-label" >地下车位数:</label>
				<div class="control-details">
					<div class="control-details"><p class="ellipsis">{{premises.downCarPort}}</p></div>
				</div>
			</div>
		</li>
		<li>
			<div class="list-info-template col-md-6">
				<label class="control-label" for="">规划户数:</label>
				<div class="control-details"><p class="ellipsis">{{premises.houseHolds}}</p></div>
			</div>
		</li>
  		<li>
    		<div class="list-info-template col-md-6">
          		<label class="control-label" for="">均价:</label>
          		<div class="control-details"><p class="ellipsis">{{premises.averagePrice}} 元/㎡</p></div>
    		</div>
    		<div class="list-info-template col-md-6">
              	<label class="control-label" for="">物业地址:</label>
              	<div class="control-details"><p class="ellipsis">{{premises.propertyAddr}}</p></div>
    		</div>
  		</li>
  		<li>
    		<div class="list-info-template col-md-6">
          		<label class="control-label" for="">{{premises.dealType == 2?'现金奖':'成交奖'}}:</label>
          		<div class="control-details"><p class="ellipsis">{{premises.dealAward}} 元</p></div>
    		</div>
    		<div class="list-info-template col-md-6">
          		<label class="control-label" for="">最短报备时间:</label>
          		<div class="control-details">
					<p class="ellipsis" v-if="premises.specialTime && premises.specialTimeType != '4'">{{setProtectTime(premises.specialTime,premises.specialTimeType)}}</p>
					<p class="ellipsis" v-else>--</p>
				</div>
    		</div>
  		</li>
   		<li>
    		<div class="list-info-template">
				<label class="control-label" for="">分销佣金:</label>
				<div v-for="(item, index) in commissionList" :key="index" class="control-button-wrap">
					<div class="control-button-wrap-content">
						<span>{{item.name}}</span> : <span>{{item.typeValue}}{{item.type}}</span>
					</div>
				</div>
				<div>&nbsp;</div>
			</div>
  		</li>
  		<li>
			<div class="list-info-template col-md-6">
      			<label class="control-label" for="">带看奖励:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.reward}} 元</p></div>
    		</div>
			<div class="list-info-template col-md-6">
				<label class="control-label" for="">{{dealType}}</label>
				<div class="control-details">
					<p class="ellipsis">{{premises.dealAward}}元</p>
				</div>
			</div>
  		</li>
		<li>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">到访延长时间:</label>
      			<div class="control-details">
					<p class="ellipsis" v-if="premises.visitProtectSwitch && premises.visitProtectSwitch == '1'">{{setProtectTime(premises.visitProtect,premises.visitProtectType)}}</p>
					<p class="ellipsis" v-else>--</p>
				</div>
    		</div>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">交易延长时间:</label>
      			<div class="control-details">
					<p class="ellipsis" v-if="premises.saveDaysType && premises.saveDaysType != '4'">{{setProtectTime(premises.saveDays,premises.saveDaysType)}}</p>
					<p class="ellipsis" v-else>--</p>
				</div>
    		</div>
  		</li>
  		<li>
			<div class="list-info-template col-md-6">
      			<label class="control-label" for="">项目经理:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.manager}}</p></div>
    		</div>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">联系方式:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.mobile}}</p></div>
    		</div>
  		</li>
  		<li>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">在售状态:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.saleStatusName}}</p></div>
			</div>
			<div class="list-info-template col-md-6">
      			<label class="control-label" for="">结佣方式:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.commissionWay}}</p></div>
    		</div>
  		</li>
  		<li>
    		<div class="list-info-template col-md-6">
      			<label class="control-label" for="">合作开始时间:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.formatCooperationBeginTime}}</p></div>
    		</div>
			<div class="list-info-template col-md-6">
      			<label class="control-label" for="">合作结束时间:</label>
      			<div class="control-details"><p class="ellipsis">{{premises.formatCooperationEndTime}}</p></div>
			</div>
  		</li>
  		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">促销信息:</label>
      			<div class="control-text">
      				<p v-html="premises.discount"></p>
      			</div>
    		</div>
   		</li>
  		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="" >项目特色:</label>
      			<div class="control-text">
      				<p v-html="premises.feature"></p>
      			</div>
    		</div>
   		</li>
   		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="" >合作规则:</label>
      			<div class="control-text">
      				<p v-html="premises.cooperationRule"></p>
      			</div>
    		</div>
   		</li>

   		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">楼盘卖点:</label>
      			<div class="control-text">
      				<p v-html="premises.selling"></p>
      			</div>
    		</div>
   		</li>

		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">楼盘地址:</label>
      			<div class="control-text">
      				<p>{{premises.premisesAddress}}</p>
      			</div>
    		</div>
   		</li>
   		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">售楼部地址:</label>
      			<div class="control-text">
      				<p>{{premises.saleAddr}}</p>
      			</div>
    		</div>
   		</li>

   		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">目标客户:</label>
      			<div class="control-text">
      				<p v-html="premises.customer"></p>
      			</div>
    		</div>
   		</li>
   		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">拓客技巧:</label>
      			<div class="control-text">
      				<p v-html="premises.saleSkill"></p>
      			</div>
    		</div>
   		</li>
   		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">项目简介:</label>
      			<div class="control-text">
      				<p v-html="premises.introduction"></p>
      			</div>
    		</div>
   		</li>
		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">报备模板:</label>
      			<div class="control-text">
      				<p v-html="premises.reportTemp"></p>
      			</div>
    		</div>
   		</li>
		<li>
			<div class="list-info-template col-sm-12">
				<label class="control-label" for="">楼盘资料:</label>
				<div class="control-text">
					<ul>
						<li v-for='(item, index) in premisesFileList' style="display:inline">
							<div v-if="item.isDeleted == 0">
								<i class="fa fa-file-word-o" v-if="item.fileType == 8"></i>
								<i class="fa fa-file-excel-o" v-if="item.fileType == 9"></i>
								<i class="fa fa-file-ppt-o" v-if="item.fileType == 10"></i>
								<i class="fa fa-file-image-o" v-if="item.fileType == 11"></i>
								<i class="fa fa-file-pdf-o" v-if="item.fileType == 12"></i>
								<i class="fa fa-file-zip-o" v-if="item.fileType == 13"></i>
								<a style="padding-left: 5px; padding-right: 5px; text-decoration: underline;" v-bind:href="item.url">{{item.fileName}}</a>
							</div>
						</li>
					</ul>
				</div>
			</div>
		</li>
   		<li v-if="(premises.lsUrl&&premises.lsUrl.length > 0 && premises.lsUrl != null)">
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">楼书:</label>
      			<div class="control-text">
          			<p>
          				<a v-bind:href="premises.lsUrl" v-if="(null != premises.lsUrl && premises.lsUrl.length > 0)" target="_blank" style="color: cornflowerblue">
          					楼书附件
          				</a>
      				</p>
      			</div>
    		</div>
   		</li>

   		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">全景看房:</label>
      			<div class="control-text">
          			<p>
          				<a v-bind:href="premises.panoramicView" v-if="premises.panoramicView" target="_blank" style="color: cornflowerblue">
          					全景看房地址
          				</a>
          			</p>
      			</div>
    		</div>
   		</li>
		<li>
			<div class="list-info-template col-sm-12">
				<label class="control-label" for="">报备推荐人:</label>
				<div class="control-text">
					<p>{{premises.premisesRecommenderList | filterShowRecommend}}</p>
				</div>
			</div>
		</li>
   		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">可售户型:</label>
      			<div class="control-text">
	              	<ul id="hxtListUl">
	              		<li class="col-md-4"  v-for="(hxt, index) in hxtList" :key="index">
							<div :id="'hxt_'+index">
								<img v-for="(path, i) in hxt.imgUrl" :key="i" v-bind:src="path" v-show="i == 0"  width="210px" height="140px;" style="display: none;"/>
							</div>
							<div class="hxtImgTip">{{hxt.imgUrl.length}}张</div>
	              			<p>{{hxt.apartmentLayout}}&emsp;{{hxt.area}}平米</p>
	              		</li>
	              	</ul>
      			</div>
    		</div>
   		</li>
		<li>
			<h3>楼盘相册</h3>
			<ul class="nav nav-tabs" style="margin: 15px">
				<li role="presentation" class="active" style="padding:0"><a href="#3" data-toggle="tab">样板间({{showImgCount(premisesImages[3])}})</a></li>
				<li role="presentation" style="padding:0"><a href="#4" data-toggle="tab">效果图({{showImgCount(premisesImages[4])}})</a></li>
				<li role="presentation" style="padding:0"><a href="#5" data-toggle="tab">小区配套({{showImgCount(premisesImages[5])}})</a></li>
				<li role="presentation" style="padding:0"><a href="#6" data-toggle="tab">实景图({{showImgCount(premisesImages[6])}})</a></li>
				<li role="presentation" style="padding:0"><a href="#7" data-toggle="tab">项目现场({{showImgCount(premisesImages[7])}})</a></li>
			</ul>
			<div class="tab-content panel-body" style="margin: 15px;min-height: 110px;">
				<div class="tab-pane fade in " :class="{active:row==3}" :id="row" v-for="(row,index) in premisesTypes" :key="index">
					<ul class="premises-image-list" >
						<li class="col-md-2"  v-for="(img, i) in premisesImages[row]" :key="i"  >
							<img v-bind:src="img.imageUrl"  width="100px" height="80px;"/>
						</li>
					</ul>
				</div>
			</div>
		</li>

		<h3>公司信息</h3>
			<ul class="housing-list">
				<li>
					<div class="list-info-template col-md-6">
						<label class="control-label" for="">公司名称:</label>
						<div class="control-details">
							<p class="ellipsis">{{premises.corporateName}}</p>
						</div>
					</div>

				</li>

				<li>
					<div class="list-info-template col-sm-12">
						<label class="control-label" for="">公司简介:</label>
						<div class="control-text">
							<p v-html="premises.corporateDesc"></p>
						</div>
					</div>
				</li>

				<li>
					<div class="list-info-template col-sm-12">
						<label class="control-label" for="">证照资料:</label>
						<div class="control-text">
							<ul id="companyFileTab" class="nav nav-tabs">
								<li class="active">
									<a href="#yingyezhizhao" data-toggle="tab">营业执照</a>
								</li>
								<li>
									<a href="#fenxiao" data-toggle="tab">分销合同</a>
								</li>
								<li>
									<a href="#xukezheng" data-toggle="tab">预售许可证</a>
								</li>
								<li>
									<a href="#shouquanshu" data-toggle="tab">开发商授权书</a>
								</li>
							</ul>
							<div id="companyFileTabContent" class="tab-content">
								<div class="tab-pane fade in active" id="yingyezhizhao">
									<li class="col-md-2 file-image" v-for="(row,index) in licenseList" :key="index" v-if="row.isDeleted==0 && row.imageType==60">
										<img v-bind:src="row.imageUrl" width="150px" height="115px" />
									</li>
								</div>
								<div class="tab-pane fade" id="fenxiao">
									<li class="col-md-2 file-image" v-for="(row,index) in licenseList" :key="index" v-if="row.isDeleted==0 && row.imageType==70">
										<img v-bind:src="row.imageUrl" width="150px" height="115px" />
									</li>
								</div>
								<div class="tab-pane fade" id="xukezheng">
									<li class="col-md-2 file-image" v-for="(row,index) in licenseList" :key="index" v-if="row.isDeleted==0 && row.imageType==80">
										<img v-bind:src="row.imageUrl" width="150px" height="115px" />
									</li>
								</div>
								<div class="tab-pane fade" id="shouquanshu">
									<li class="col-md-2 file-image" v-for="(row,index) in licenseList" :key="index" v-if="row.isDeleted==0 && row.imageType==90">
										<img v-bind:src="row.imageUrl" width="150px" height="115px" />
									</li>
								</div>
							</div>
						</div>
					</div>

				</li>

			</ul>
   		<li>
    		<div class="list-info-template col-sm-12">
      			<label class="control-label" for="">封面图片地址:</label>
      			<div class="control-text">
      				<img v-bind:src="premises.url"  width="500px" height="400px;"/>
      			</div>
			</div>
   		</li>
	</ul>
</div>
</div>
</template>
<style scoped>
.control-button-wrap {
	display: inline-block;
	height: 38px;
	border-radius: 3px;
	margin-left: 22px;
	/* position: relative;
	top: -10px; */
  }
  .white_content_header {
	  width: 100%;
	  height: 40px;
	  line-height: 40px;
	  background: rgba(248, 248, 248, 1);
	  border-bottom: 1px solid #d3d3d3;
  }
  .control-button-wrap-content {
	  min-width: 120px;
	  min-height: 38px;
	  line-height: 38px;
	  border-radius: 3px;
	  text-align: center;
	  color: #999;
	  border: 1px solid #d3d3d3;
	  margin-top: 10px;
	  position: relative;
	  top: -10px;
  }
  .control-button-wrap-content .delete-commission {
	  width: 10px;
	  height: 10px;
	  line-height: 10px;
	  font-size: 10px;
	  border-radius: 50%;
	  border: 1px solid #F87242;
	  color: #F87242;
	  cursor: pointer;
	  float: right;
  }
  .control-button-add {
	display: inline-block;
	width: 70px;
	height: 38px;
	line-height: 38px;
	text-align: center;
	border: 1px dashed #ccc;
	border-radius: 5px;
	color: #999;
	cursor: pointer;
	position: relative;
	top: -7px;
	margin-left: 5px;
  }
  .black_overlay{
    display: none;
    position: absolute;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index:1001;
    -moz-opacity: 0.8;
    opacity:.50;
    filter: alpha(opacity=50);
  }
	.white_content {
		display: none;
		position: absolute;
		top: 20%;
		left: 36%;
		width: 333px;
		height: 211px;
		border: 2px solid #d3d3d3;
		background-color: white;
		z-index: 1002;
		/* overflow: auto; */
		border-radius: 5px;
	}
	.white_content_title {
		color: #F87242;
		font-weight: 700;
		margin-left: 20px;
		font-size: 14px;
	}
	.white_content_close {
		float: right;
		margin: 10px 10px 0 0;
		width: 20px;
		height: 20px;
		line-height: 20px;
		text-align: center;
		color: #999;
		font-size: 29px;
		border: 1px solid #d3d3d3;
		cursor: pointer;
	}
	.first_white_input {
		width: 80%;
		margin: 10px auto 20px;
	}
	.first_white_input .set_format, .set_money {
		color: #333;
		font-size: 14px;
	}
	.first_white_input input {
		height: 32px;
		border-radius: 3px;
		outline: 0;
		border: 1px solid #999;
	}
	.first_white_input input:focus {
		border: 1px solid #F87242
	}
	.select_type {
		width: 50px;
		height: 32px;
		float: right;
		border-radius: 5px;
		display: flex;
		flex-direction: row;
		cursor: pointer;
	}
	.select_type #type_money {
		width: 25px;
		height: 32px;
		line-height: 32px;
		/* background: #F87242; */
		color: #fff;
		border-top-left-radius:5px;
		border-bottom-left-radius:5px;
		text-align: center;
	}
	.select_type #type_percent {
		width: 25px;
		height: 32px;
		line-height: 32px;
		text-align: center;
		/* background: #d3d3d3; */
		color: #fff;
		border-top-right-radius:5px;
		border-bottom-right-radius:5px;
	}

	.set_money_input::-webkit-outer-spin-button,
    .set_money_input::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }
    .set_money_input[type="number"]{
        -moz-appearance: textfield;
    }

	.check_type {
		background: #F87242;
	}
	.check_type1 {
		background: #d3d3d3;
	}
	.first_white_button {
		background: #F87242;
		color: #fff;
		width: 83px;
		height: 32px;
		line-height: 32px;
		text-align: center;
		font-size: 16px;
		border-radius: 3px;
		float: right;
		margin-right: 30px;
		cursor: pointer;
	}
	.premises-image-li{padding:0;}
	.hxtImgTip {position: absolute;top: 133px;left: 185px;background-color: #ddd;width: 25px;height: 25px;text-align: center;line-height: 25px;}
</style>
<script>
	import viewer from '../../assets/js/viewer.js'
	export default{
		data(){
			return {
				premises:{},
				dealType: '',
				hxtList:[],
				commissionList: [],
                premisesImages:[],
                premisesTypes:[3,4,5,6,7],
                licenseList: [],
				scrollHeight: 0,
				premisesFileList: []
			}
		},
		mounted:function(){
			this.scrollHeight = document.body.clientHeight - 130;
			//初始化
			this.initData();
			this.initHxt();
		},
		filters: {
			filterShowRecommend (list) {
				if(!list) return "无"
				let tmpArr = []
				list.forEach(item => {
					//if(item.status === '1') {
						tmpArr.push(item.userName)
					//}
				})
				if(!tmpArr.length) return "无"
				return  tmpArr.join('、')
			}
		},
		methods:{
			initData:function(){
				var _self = this;
				var url = this.utilHelper.apiUrl+"/api/getPremisesDetail";
				var  params={
					id:_self.$route.params.premisesId
				};
				var body = {};
				body.params = params;
				_self.$http.post(url,body).then((response)=>{
					var resData = response.body.resData;
					if(resData.result=="1"){
						_self.premises = resData.detailResDto;
						_self.licenseList = resData.detailResDto.licenseList;
						// _self.premisesImages = resData.premisesImages;
						if(_self.premises.dealType == "2"){
						    _self.dealType = "现金奖:";
						}else {
						    _self.dealType = "成交奖:";
						}
						if(_self.premises.commission){
							_self.commissionList = JSON.parse(_self.premises.commission);
						}
						//均价
                        if(_self.premises.averagePrice != ','){
                            let price = _self.premises.averagePrice.split(',');
                            if(price.length > 1 ){
                                if(price[0] && price[1]){
                                    _self.premises.averagePrice =price[0] + ' 至 ' + price[1];
                                }else if(price[0]){
                                    _self.premises.averagePrice =price[0];
                                }else if(price[1]){
                                    _self.premises.averagePrice =price[1];
                                }
                            }
						}
						_self.getImageAndFile(resData.premisesImages);
					}
				});
			},
			initHxt(){
				var _self = this;
				var url = this.utilHelper.apiUrl+"/api/getPremisesHxt";
				var  params={
					id:_self.$route.params.premisesId
				};
				var body = {};
				body.params = params;
				_self.$http.post(url,body).then((response)=>{
					var resData = response.body.resData;
					if(resData.result=="1"){
						_self.hxtList = resData.getPremisesHxt;
						if (_self.hxtList && _self.hxtList.length > 0) {
							_self.hxtList.forEach((item, index) => {
								item.imgUrl = item.imgUrl.split(';')
								_self.imgViewer('hxt_'+index);
							});
						}
					}
				});
			},
			getImageAndFile: function(premisesImages){
				var _self = this;
				_self.premisesImages = {};
				_self.premisesFileList = [];
				var imageTypeList = [3, 4, 5, 6, 7];
				var fileTypeList = [8, 9, 10, 11, 12, 13];
				for(var item in premisesImages){
					inter:
					for(var k = 0; k < imageTypeList.length; k++){
						if(imageTypeList[k] == item){
							_self.premisesImages[item] = premisesImages[item];
							break inter;
						}
					}
					for(var k = 0; k < fileTypeList.length; k++){
						if(fileTypeList[k] == item){
							for(var i = 0; i <premisesImages[item].length; i ++){
								var premisesFile = {
									isDeleted: premisesImages[item][i].isDeleted,
									url: premisesImages[item][i].imageUrl,
									fileType: premisesImages[item][i].imageType,
									fileName: premisesImages[item][i].imageName,
									id: premisesImages[item][i].id
								}
								_self.premisesFileList.push(premisesFile);
							}
							break;
						}
					}
					console.log(_self.premisesFileList)
				}
			},
			imgViewer (id) {
				this.$nextTick(() => {
					$('#' + id).viewer();
				})
			},
			  back:function(){
				this.$router.back(-1);
			  },
			  showImgCount(list){
				  if(list){
					  return list.length;
				  }else{
					  return 0;
				   }
			  },
		setProtectTime(time,type){
            if(type == '1'){
                return time / 1440 +'天'
            } else if(type == 2) {
				return time / 60 + '小时'
			}
			return time+'分钟'
        }
	}
	}

</script>
